This application relates to creating and rendering 3D surfaces in a computer system.
Many computer graphics applications render complex three-dimensional (3D) surface geometries by iteratively refining simple, coarse 3D geometries, known as xe2x80x9cbase meshes.xe2x80x9d In general, each base mesh is a collection of triangle faces, in which trios of adjacent points, or vertices, are connected to form an approximation of a 3D surface. This approximation represents a coarse approximation of a more complex, ideal 3D surface, known as a xe2x80x9climit subdivision surface,xe2x80x9d or xe2x80x9climit surface.xe2x80x9d
A computer creates an initial xe2x80x9csubdivision surfacexe2x80x9d from a base mesh by applying a computational kernel, known as a xe2x80x9csubdivision kernel,xe2x80x9d to the triangles and vertices in the base mesh. Repeated and recursive application of the subdivision kernel yields increasingly smooth meshes that converge at the limit surface as the number of iterations approaches infinity.
Producing a subdivision surface typically involves computing a weighted midpoint between each pair of vertices in each triangle (i.e., along each edge in the mesh) and then connecting the midpoints, or xe2x80x9ctessellatingxe2x80x9d the triangle, to create four smaller triangles. The time required to subdivide a 3D surface mesh depends upon the technique used in tessellating the triangles in the mesh. More efficient tessellation techniques reduce processing time and therefore improve rendering speed.
In rendering 3D surfaces, computers must often calculate surface normal vectors to ensure realistic light shading of the surfaces. Simple lighting models use the angle between a surface normal vector and a vector in the direction of the light source to calculate how much light strikes the surface at a corresponding vertex. In general, the computer must compute a surface normal vector for each new vertex produced in the subdivision surface computations. As with tessellation, more efficient surface normal calculation reduces processing time and therefore improves rendering speed.
In one aspect, the invention features using a computer to create a digital model of a 3D surface to be rendered. The computer obtains an initial digital model of the 3D surface and identifies first and second base triangles in the initial model. The first base triangle is subdivided into a plurality of subdivision triangles including a first subdivision triangle. Likewise, the second base triangle is subdivided into a plurality of subdivision triangles including a second subdivision triangle. The first and second subdivision triangles share an edge.
The computer assigns first and second identifying labels to the first and second subdivision triangles to indicate their positions in the first and second base triangles. Thereafter, the computer further subdivides the digital model. One technique for further subdividing the digital model includes applying a computer-implemented test to the first identifying label to derive the second identifying label automatically, using the first and second identifying labels to retrieve information about the first and second subdivision triangles, and then using this information to subdivide the first subdivision triangle into smaller triangles.
Other embodiments and advantages will become apparent from the following description and from the claims.